class Student{
    private String name;
    private int age;
    private String stuNum;
    public static String className;

    public void goToSchool(){
        System.out.println("go to school");
    }

    public void eat(){
        System.out.println("eat");
    }
    public void doHomework(){
        System.out.println("do homework");
    }
    public Student(String name,int age,String stuNum){
        this.name=name;
        this.age=age;
        this.stuNum=stuNum;
    }
    public void show(){
        System.out.println("姓名："+this.name+"班级："+className+"年龄："+this.age+"学号："+stuNum);
    }
}
public class Text {


    public static void main(String[] args) {
        Student student1 =new Student("小明",18,"6015141578");
        Student.className="1班";
        student1.show();
        Student student2=new Student("小红",16,"5050542578");
        student2.show();
    }
}
